﻿using System;
using System.Collections.Generic;
using System.Peppers.Win32;
using System.Runtime.InteropServices;
using System.Text;

namespace System.Peppers.UI
{
    /// <summary>
    /// Quick implemenation of message box, you do not want to load WinForms in a shell extension
    /// </summary>
    public static class MessageBox
    {
        /// <summary>
        /// Shows a message box
        /// </summary>
        /// <param name="text">Content</param>
        /// <returns>Result of MessageBox</returns>
        public static MessageBoxResult Show(string text)
        {
            return User32.MessageBox(IntPtr.Zero, text, string.Empty, MessageBoxOptions.Ok);
        }

        /// <summary>
        /// Shows a message box
        /// </summary>
        /// <param name="text">Content</param>
        /// <param name="caption">Caption header</param>
        /// <returns>Result of MessageBox</returns>
        public static MessageBoxResult Show(string text, string caption)
        {
            return User32.MessageBox(IntPtr.Zero, text, caption, MessageBoxOptions.Ok);
        }

        /// <summary>
        /// Shows a message box
        /// </summary>
        /// <param name="text">Content</param>
        /// <param name="caption">Content</param>
        /// <param name="options">Caption Header</param>
        /// <returns>Result of MessageBox</returns>
        public static MessageBoxResult Show(string text, string caption, MessageBoxOptions options)
        {
            return User32.MessageBox(IntPtr.Zero, text, caption, options);
        }
    }
}
